broadway: Call setlocale in main function of broadwayd
authorTing-Wei Lan <lantw@src.gnome.org>
Mon, 11 Jan 2016 03:46:45 +0000 (11:46 +0800)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 13 Jan 2016 04:00:03 +0000 (23:00 -0500)
It is required to correctly show translated messages on some locales.

https://bugzilla.gnome.org/show_bug.cgi?id=760416

gdk/broadway/broadwayd.c

index feca655aeb28c9fbb8fb201cae154653d8fd5cf0..143f438c2c8f0e28dfe36e7c644cc79dc38bc290 100644 (file)
@@ -7,6 +7,7 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <locale.h>
 
 #include <glib.h>
 #include <gio/gio.h>
@@ -434,6 +435,8 @@ main (int argc, char *argv[])
     { NULL }
   };
 
+  setlocale (LC_ALL, "");
+
   context = g_option_context_new ("[:DISPLAY] - broadway display daemon");
   g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
   if (!g_option_context_parse (context, &argc, &argv, &error))